﻿using System.Data.Entity.ModelConfiguration;

namespace DAL.Configuration
{
    /// <summary>
    /// ProductConfiguration
    /// </summary>
    public class ProductConfiguration : EntityTypeConfiguration<BO.Product>
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ProductConfiguration"/> class.
        /// </summary>
        public ProductConfiguration()
            : base()
        {
            // Ignore model properties
            Ignore(s => s.Publish);
            Ignore(s => s.Id);
            Ignore(s => s.VersionStamp);

            // Map column name & property name
            //Property(x => x.Id).HasColumnName("ProductId");

            // Table name mapping
            ToTable("Product");
        }
    }
}